package cmbchina.entity;


import java.io.Serializable;
import java.util.Objects;

/**
 * A FlowForm.
 */
public class FlowForm implements Serializable {


    private Long id;

    private String processInstId;

    private String fromInfo;

    private String result;

    private Long createTime;

    private Long lastUpdateTime;

    private Integer version;

    private String resultCode;//为空就是未执行

    private String resultState;//流程状态 1.准备 2.运行中 3.暂停 4.失败 5.成功 6.定时中

    public String getResultState() {
        return resultState;
    }

    public void setResultState(String resultState) {
        this.resultState = resultState;
    }

    private String taskId;

    private String taskDefinitionKey;

    private String taskName;
    private String taskType;

    public String getTaskType() {
        return taskType;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getTaskDefinitionKey() {
        return taskDefinitionKey;
    }

    public void setTaskDefinitionKey(String taskDefinitionKey) {
        this.taskDefinitionKey = taskDefinitionKey;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getProcessInstId() {
        return processInstId;
    }

    public FlowForm processInstId(String processInstId) {
        this.processInstId = processInstId;
        return this;
    }

    public void setProcessInstId(String processInstId) {
        this.processInstId = processInstId;
    }

    public String getFromInfo() {
        return fromInfo;
    }

    public FlowForm fromInfo(String fromInfo) {
        this.fromInfo = fromInfo;
        return this;
    }

    public void setFromInfo(String fromInfo) {
        this.fromInfo = fromInfo;
    }

    public String getResult() {
        return result;
    }

    public FlowForm result(String result) {
        this.result = result;
        return this;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public FlowForm createTime(Long createTime) {
        this.createTime = createTime;
        return this;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getLastUpdateTime() {
        return lastUpdateTime;
    }

    public FlowForm lastUpdateTime(Long lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
        return this;
    }

    public void setLastUpdateTime(Long lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public Integer getVersion() {
        return version;
    }

    public FlowForm version(Integer version) {
        this.version = version;
        return this;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public String getResultCode() {
        return resultCode;
    }

    public FlowForm resultCode(String resultCode) {
        this.resultCode = resultCode;
        return this;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FlowForm flowForm = (FlowForm) o;
        if (flowForm.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), flowForm.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "FlowForm{" +
            "id=" + getId() +
            ", processInstId='" + getProcessInstId() + "'" +
            ", fromInfo='" + getFromInfo() + "'" +
            ", result='" + getResult() + "'" +
            ", createTime='" + getCreateTime() + "'" +
            ", lastUpdateTime='" + getLastUpdateTime() + "'" +
            ", version='" + getVersion() + "'" +
            ", resultCode='" + getResultCode() + "'" +
            "}";
    }
}
